package org.feign.test.controller;

import org.feign.test.service.FeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LHB
 * @date 2019/10/15 16:01
 */

@RestController
public class FeignController {

    @Autowired
    private FeignService feignService;

    @RequestMapping(value = "/get")
    public String get() {
        return feignService.get();
    }
    @RequestMapping(value = "/getUser")
    public String getUser(@RequestParam(name = "name") String name) {
        return feignService.getUser(name);
    }

}
